router: always use link-local src address for RAs
authorDavid Härdeman <[email protected]>
Sun, 2 Nov 2025 18:25:13 +0000 (19:25 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Mon, 3 Nov 2025 07:24:15 +0000 (08:24 +0100)
commit74eeff193848a993ee0c42acbd2f4d58721e091c
treeadf5de4b667cdbbafd0b4ec7504b50d1f95f76bc
parentb9a071b8341fbaa2d518df6b45286b1a822845ee
router: always use link-local src address for RAs

This is a follow-up to:
https://github.com/openwrt/odhcpd/pull/242

As noted by @willmo [1], RAs are currently not strictly limited to using a
link-local source address, which they should according to RFC4861, §4.2.

This is usually not an issue, since router solicitations typically
originate from link-local source addresses or the undefined address,
meaning that odhcpd will reply with its own link-local address
(auto-selected by the kernel).

But if a solicitation is sent from e.g. a GUA/ULA address, odhpcd will
currently reply using it's own GUA/ULA address.

While fixing this, correct some misleading comments.

[1] https://github.com/openwrt/odhcpd/pull/242#issuecomment-3475020864

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/297
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/router.c